﻿using MediatR;
using SystemLYH.API.Application.Command.QualityCommand;
using SystemLYH.Domain;
using SystemLYH.Infrstructre.Impl;
using SystemLYH.Infrstructre.Interface;

namespace SystemLYH.API.Application.Handlers.QualityHandlers
{
    public class QualityBackfillHandlers : IRequestHandler<QualityBackfillCommand, Qualityduring>
    {
        protected readonly IQualityRepository _qualityRepository;
        /// <summary>
        /// 库位构造函数
        /// </summary>
        /// <param name="qualityRepository"></param>
        public QualityBackfillHandlers(IQualityRepository qualityRepository)
        {
            _qualityRepository = qualityRepository;
        }
        public async Task<Qualityduring> Handle(QualityBackfillCommand request, CancellationToken cancellationToken)
        {
            return await _qualityRepository.GetAsync(request.QualityId);
        }
    }
}
